/**
 * Created by Aber on 17/3/23.
 */
// 加载模块
define('note-box',function () {

})
module.exports = function(ngModule) {
    require('./user_analysis.scss');
    require(['note-box'], function (my){
        var $=require('../../../public/js/jquery.min')
        $(function () {
            require('../../../public/js/flot/jquery.flot.js')
            require('../../../public/js/flot/jquery.flot.resize.js')
            require('../../../public/js/flot/jquery.flot.tooltip.min.js')
            var d1=[[1262304000000,6],[1264982400000,3057],[1267401600000,20434],[1270080000000,31982],[1272672000000,26602],[1275350400000,27826],[1277942400000,24302],[1280620800000,24237],[1283299200000,21004],[1285891200000,12144],[1288569600000,10577],[1291161600000,10295]];
            var data2=[{label:"Data 1",data:d1,color:"rgb(186,186,186)"}];
            $.plot($("#flot-chart1"),data2,{xaxis:{tickDecimals:0},series:{lines:{show:true,fill:true,fillColor:{colors:[{opacity:1},{opacity:1}]}},points:{width:0.1,show:false}},grid:{show:false,borderWidth:0},legend:{show:false,}});
        })
    });

    ngModule.directive('userAnalysis',function () {
        return {
            restrict: 'E',//元素(element)
            scope: {},
            replace: true,
            template: require('./user_analysis.html'),//模板
            controllerAs: 'user_analysis',// <=> $scope.vm = {greeting: '你好，我是卡哥'}
            controller: function () {
            }
        }
    });//定义指令，对应页面中的<hello-world></hello-world>
}